package com.lyp.qczp.dao;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.lyp.qczp.entity.Employee;
@Transactional 
public interface Employeedao extends JpaRepository<Employee, Integer>, JpaSpecificationExecutor<Employee> {
	// 根据姓名查员工（登录用
	Employee findByeName(String eName);
	Employee findByeId(Integer eId);
	//删除
	@Modifying 
	@Query(value = "UPDATE employee set e_type=?1 where e_id=?2",nativeQuery = true)
	int updateeTypeByeId(Integer eType,Integer eId);
}
